package com.platform.comm.util;

import com.platform.comm.config.IdGenProperties;

import java.util.Objects;

/**
 * Description: 公共类.
 *
 * @author libinal created on 2021/3/3.
 * @version 1.0.0
 */
public final class CommUtils {

    /**
     * 获取应用系统编号(centerId + workId)
     *
     * @return <String>
     */
    public static String getAppNo() {
        IdGenProperties idGenProperties = SpringBeansUtil.getBean(IdGenProperties.class);
        if (!Objects.isNull(idGenProperties)) {
            return idGenProperties.getCenterId() + "" + idGenProperties.getWorkId();
        }
        return "";
    }
}
